home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / misc / recall / scripts / sbasepro->ascii next >
Text File  |  1994-04-28  |  1KB  |  53 lines

  1.  REM *
  2.  REM * birthday.sbp - (c)1994 Thorsten Gau - freely distributable
  3.  REM *
  4.  REM * This is a little demo to use with SBase4pro and Recall V2.x
  5.  REM * It demonstates how to extract some birhdays from a database.
  6.  REM * After saving the output to a file you may import it to ReCall.
  7.  REM *
  8.  REM * You need to change the names according to your database !!!
  9.  REM *
  10.  REM * To contact me EMail to: root@gauhh.hanse.de
  11.  REM *
  12.  
  13.  
  14.  CLS 
  15.  
  16.  del$ = CHR$ (34) + "," + CHR$ (34)
  17.  FILE "adr"
  18.  
  19.  REQUEST "Save to a file ?","",130,rc%
  20.  IF rc% = 1 THEN 
  21.     filename$ = "ram:"
  22.     REQUEST "Save As...","",18,rc%,filename$
  23.     IF rc% = 1 THEN 
  24.        write% = 1
  25.        OPEN filename$ FOR OUTPUT 
  26.     END IF 
  27.  END IF 
  28.  
  29.  SELECT WHERE Geburtstag > "01.01.1900"
  30.  
  31.  SELECT FIRST 
  32.  WHILE NOT EOF ("adr")
  33.    d$ = STR$ ( DAY (Geburtstag))
  34.    m$ = STR$ ( MONTH (Geburtstag))
  35.    y$ = STR$ ( YEAR (Geburtstag) - 1900)
  36.    dd$ = d$ + "." + m$ + "."
  37.  
  38.    ? CHR$ (34) + "* "; TRIM$ (VName);" "; TRIM$ (NName);del$;
  39.    ? dd$ + "0";del$;
  40.    ? "-1:-1";del$;
  41.  
  42.    IF y%% > 93 THEN 
  43.       ? TRIM$ (VName);" hat am ";dd$;" Geburtstag.";
  44.    ELSE 
  45.       ? TRIM$ (VName);" wird {" + d$ + m$ + y$ + "}! Und zwar am ";dd$;
  46.    END IF 
  47.  
  48.    ? CHR$ (34)
  49.    SELECT NEXT 
  50.  WEND 
  51.   
  52.  IF write% = 1 THEN CLOSE OUTPUT 
  53.